<!DOCTYPE html>
<html lang="zh-CN">

	<head>
		<meta charset="UTF-8">
		<title>品牌添加</title>
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<link rel="stylesheet" href="assets/css/bootstrap.css">
		<link rel="stylesheet" href="assets/css/brand_modify.css">
	</head>

	<body>
		<div class="container-fluid">
			<div class="row">
				<div class="col-md-12">
					<h1 class="page-header">
                                              品牌管理<small>品牌添加</small>
                     </h1>
				</div>
			</div>

			<div class="row">
				<div class="col-md-12">
					<!-- 分类列表--bootstrap高级表格使用 -->
					<div class="panel panel-default">
						<div class="panel-heading" style="text-align: right;">

							<font style="float:left;">品牌添加</font>

							<a href="brand.html"> <input id="return" name="return" type="button" value="返回列表" class="btn btn-info" /></a>
						</div>
						<div class="panel-body">

							<!--table-responsive响应式表格，会自动添加滚动条-->
							<div class="table-responsive">

								<table class="table table-striped table-bordered table-hover" id="brand_modify" name="brand_modify">

									<tbody>
										<tr class="odd gradeX">
											<td>
												<font color="#FF0000">*</font>品牌名称&nbsp;&nbsp;&nbsp;&nbsp;
												<input id="brand_name" name="brand_name" type="text" />
											</td>
											<td>
												<font color="#FF0000">*</font>品牌类型&nbsp;&nbsp;&nbsp;&nbsp;
												<select id="brand_type" name="brand_type">
													<option value=""></option>
													<option value="窗帘">窗帘</option>
													<option value="灯饰">灯饰</option>
													<option value="家具">家具</option>
													<option value="装饰画">装饰画</option>
													<option value="壁纸">壁纸</option>
												</select>
											</td>
										</tr>
										<tr class="odd gradeC">

											<td>&nbsp;品牌简称&nbsp;&nbsp;&nbsp;&nbsp;<input id="brand_refer" name="brand_refer" type="text" /> </td>
											<td>&nbsp;官方网址&nbsp;&nbsp;&nbsp;&nbsp;<input id="brand_owebsite" name="brand_owebsite" type="text" /> </td>

										</tr>
										<tr class="odd gradeX">

											<td>
												&nbsp;精选品牌&nbsp;&nbsp;&nbsp;&nbsp;
												<input id="brand_isselect1" name="brand_isselect" type="radio" />是
												<input id="brand_isselect2" name="brand_isselect" type="radio" />否
											</td>
											<td>
												&nbsp;是否禁用&nbsp;&nbsp;&nbsp;&nbsp;
												<input id="brand_isdisabled1" name="brand_isdisabled" type="radio" />是
												<input id="brand_isdisabled2" name="brand_isdisabled" type="radio" />否
											</td>
										</tr>
										<tr class="odd gradeC">

											<td colspan="2">
												&nbsp;品牌图片&nbsp;&nbsp;&nbsp;&nbsp;
												<div class="upload-content">
													<div class="content-img">
														<ul class="content-img-list">
															<!-- <li class="content-img-list-item"><img src="https://www.baidu.com/img/bd_logo1.png" alt=""><a class="delete-btn"><i class="ico-delete"></i></a></li> -->
														</ul>
														<div class="file">
															<i class="ico-plus"></i>上传图片，支持jpg/png<input type="file" name="file" accept="image/*" id="upload">
														</div>
													</div>
													<div class="upload-tips">
														最多上传4张图片，单张1M
													</div>
												</div>

											</td>
										</tr>
										<tr class="odd gradeX ">

											<td colspan="2 ">
												<font color="#FF0000 ">*</font>排 序 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
												<input id="brand_sort" name="brand_sort" type="text " />
											</td>
										</tr>
										<tr class="odd gradeC ">

											<td colspan="2 ">
												&nbsp;品牌故事&nbsp;&nbsp;&nbsp;&nbsp;
												<textarea id="brand_story " name="brand_story " cols="80" rows="5" style="vertical-align:top"></textarea>
											</td>
										</tr>
										<tr class="odd gradeX ">

											<td colspan="2 ">
												&nbsp;
												<input id="brand_commit " name="brand_commit " type="submit" value="提交" class="btn btn-info" onclick="return isnum()" /> &nbsp;&nbsp;&nbsp;&nbsp;
												<input id="brand_reset " name="brand_reset " type="button" value="重置" class="btn btn-default" />
											</td>
										</tr>

									</tbody>
								</table>

							</div>

						</div>
					</div>
					<!--表格结束 -->
				</div>
			</div>
			<script type="text/javascript">
				function isnum() {
					var brandname = document.getElementById("brand_name").value;
					var brand_type = document.getElementById("brand_type").value;
					var brand_sort = document.getElementById("brand_sort").value;
					
//					alert(brandname);
//					alert(brand_type);
//					alert(brand_sort);
					
					if(brandname == "") {
						alert("品牌名称不能为空！");
						return false;
					}
					if(brand_type == "") {
						alert("商品类型不能为空！");
						return false;
					}
					if(brand_sort == "") {
						alert("排序不能为空！");
						return false;
					} else {
						var re = /^[0-9]+.?[0-9]*$/;
						if(!re.test(brand_sort)) {
							alert("排序应该为数字！");
							return false;
						}

					}

					alert("添加成功！")
					return true;
				}
			</script>

		</div>

		<!-- /. WRAPPER  -->
		<!-- JS Scripts-->
		<!-- jQuery Js -->
		<!-- Bootstrap Js -->
		<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
		<script type="text/javascript" src="assets/js/jquery-3.3.1.js"></script>
		<script type="text/javascript" src="assets/js/bootstrap.js"></script>
		<script type="text/javascript" src="assets/js/jquery.metisMenu.js"></script>
		<script type="text/javascript" src="assets/js/custom-scripts.js"></script>
		<script src="assets/js/index.js"></script>
	</body>

</html>